<script setup lang="ts">
import { Search } from '@element-plus/icons-vue'

const input1 = ref('')
const currentDate = ref(new Date())
</script>

<template>
    <div class="common-layout">
        <el-container>
            <el-aside width="300px">
                <div class="logo">
                    <img src="https://shadow.elemecdn.com/app/element/hamburger.9cf7b091-55e9-11e9-a976-7f4d0b07eef6.png" />
                </div>
                <div class="navigation">
                    <el-button round>Round</el-button>
                    <el-button round>Round</el-button>
                    <el-button round>Round</el-button>
                    <el-button round>Round</el-button>
                    <el-button round>Round</el-button>
                </div>
            </el-aside>
            <el-container>
                <el-header height="70px">
                    <el-row>
                        <el-col :span="14">
                            <el-input v-model="input1" class="" size="large" placeholder="搜索" :prefix-icon="Search" />
                        </el-col>
                        <el-col :span="10">
                            <el-badge :value="100" :max="99" class="item">
                                <el-button>我的订单</el-button>
                            </el-badge>
                            <el-badge :value="100" :max="99" class="item">
                                <el-button>我的订单</el-button>
                            </el-badge>
                            <el-badge :value="100" :max="99" class="item">
                                <el-button>我的订单</el-button>
                            </el-badge>
                        </el-col>
                    </el-row>
                </el-header>
                <el-main>
                    <el-row :gutter="24">
                        <el-col :span="6">
                            <el-card :body-style="{ padding: '0px' }">
                                <img src="https://shadow.elemecdn.com/app/element/hamburger.9cf7b091-55e9-11e9-a976-7f4d0b07eef6.png"
                                    class="image" />
                                <div style="padding: 14px">
                                    <span>Yummy hamburger</span>
                                    <div class="bottom">
                                        <time class="time">{{ currentDate }}</time>
                                        <el-button text class="button">Operating</el-button>
                                    </div>
                                </div>
                            </el-card>
                        </el-col>
                        <el-col :span="6">
                            <el-card :body-style="{ padding: '0px' }">
                                <img src="https://shadow.elemecdn.com/app/element/hamburger.9cf7b091-55e9-11e9-a976-7f4d0b07eef6.png"
                                    class="image" />
                                <div style="padding: 14px">
                                    <span>Yummy hamburger</span>
                                    <div class="bottom">
                                        <time class="time">{{ currentDate }}</time>
                                        <el-button text class="button">Operating</el-button>
                                    </div>
                                </div>
                            </el-card>
                        </el-col>
                        <el-col :span="6">
                            <el-card :body-style="{ padding: '0px' }">
                                <img src="https://shadow.elemecdn.com/app/element/hamburger.9cf7b091-55e9-11e9-a976-7f4d0b07eef6.png"
                                    class="image" />
                                <div style="padding: 14px">
                                    <span>Yummy hamburger</span>
                                    <div class="bottom">
                                        <time class="time">{{ currentDate }}</time>
                                        <el-button text class="button">Operating</el-button>
                                    </div>
                                </div>
                            </el-card>
                        </el-col>
                        <el-col :span="6">
                            <el-card :body-style="{ padding: '0px' }">
                                <img src="https://shadow.elemecdn.com/app/element/hamburger.9cf7b091-55e9-11e9-a976-7f4d0b07eef6.png"
                                    class="image" />
                                <div style="padding: 14px">
                                    <span>Yummy hamburger</span>
                                    <div class="bottom">
                                        <time class="time">{{ currentDate }}</time>
                                        <el-button text class="button">Operating</el-button>
                                    </div>
                                </div>
                            </el-card>
                        </el-col>
                    </el-row>
                </el-main>
            </el-container>
        </el-container>
    </div>
</template>

<style scoped lang="scss">
.el-aside {
    .logo {
        img {
            height: 100px;
            margin: 15px 0;
        }
    }

    .navigation {
        .el-button {
            height: 50px;
            width: 280px;
            margin: 9px 7px;
        }
    }
}

.el-header {
    margin: 10px;

    .el-input {
        // width: 510px;
        margin: 10px 40px 10px 0;
    }

    .el-badge {
        margin: 10px 15px;

        .el-badge__content {
            margin: 20px 0;
        }
    }
}

.el-main {
    padding: 0 20px;
    .el-card {
        // width: 300px;
    }
}
</style>